<!-- part 1 -->
<?php
$this->widget('zii.widgets.CListView', array(
	'dataProvider'=>$dataProvider,
	'itemView'=>'_item',
	'pagerCssClass'=>'paging',
	'template'=>"{items}\n{pager}",
	'ajaxUpdate'=>false,
));
 ?>
 <!-- part 1 end-->
<div id="header" class="bg-white">
            <div class="container_12">
                <div id="logo" class="grid_3">
                    <a href="/index.php">
                        <img src="<?php echo Yii::app()->createUrl('/') . 'themes/frontend/images/home/logo_propsage_full.png' ; ?>" height="80" />
                    </a>
                </div>
                <div id="nav" class="grid_9">
                </div>
            </div>
        </div>
        
        <div id="content-wrapper" class="bg-white">
                        <div id="account-identify" class="bg-sky bg-position-bottom">
    <div class="container_12 relative">
        <form class="form" id="identify-form" action="/account/identify" method="post">        <div class="grid_8">
            <div id="account-identify-left">
                <div class="banner">
                    <h3 class="pad15-x pad10-y">Power Up Your Real Estate Business in <span class="green">30 seconds</span></h3>
                </div>
                <div class="contents pad15-x pad10-y">
                    <h4><span class="step">STEP 1 of 2:</span> Enter your CEA Registration Number</h4>
                    <table class="table">
                        <tbody>
                            <tr>
                                <td width="135" class="align-right"><label>CEA Registration No.:</label></td>
                                <td>
                                    <input id="license_no" size="20" class="float-left" type="text" name="license_no" />                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <hr/>
                    <p>
                        <input class="orange-button small" type="submit" name="yt0" value="Proceed" />&nbsp;&nbsp;&nbsp;Already have an account? <a href="/login">Sign in here</a>
                    </p>

                </div>
            </div>
            <div id="account-identify-video" class="align-center">
                <h4>What is PropSage? Play the video below to find out</h4>
                <a href="#videoOverlay" class="playVideo">
					<img src="<?php echo Yii::app()->createUrl('/') . 'themes/frontend/images/home/macbook_play.png' ; ?>" />
                </a>
                <div style="display:none">
                                            <!-- video-overlay:start -->
                        <div id="videoOverlay">
                            <div id="jwplayer" style="width: 640px; height: 480px;"></div>
                            <script type="text/javascript">
                                $(function(){
                                    $('.playVideo').fancybox({
                                        'autoDimensions': false,
                                        'autoScale'     : false,
                                        'width'     : 650,
                                        'height'    : 500,
                                        'onComplete'    : function(){
                                            jwplayer("jwplayer").setup({
                                                file:"/media/videos/commercial.flv",
                                                flashplayer: "/js/player.swf",
                                                allowscriptaccess: "always",
                                                allowfullscreen: true,
                                                width: 640,
                                                height: 480,
                                                //                    controlbar: 'bottom',
                                                plugins: {
                                                    'viral-2': {
                                                        onpause: false,
                                                        oncomplete: false,
                                                        allowmenu: false
                                                    }
                                                }
                                            });
                                            jwplayer("jwplayer").play();
                                        },
                                        'onClosed'      : function() {
                                            //                                    jwplayer("jwplayer").stop();
                                        }
                                    });

                                    $('.playVideo').click(function(event){
                                        event.preventDefault();
                                    });
                                });
                            </script>
                        </div>      
                        <!-- video-overlay:end -->
                                    </div>
            </div>
        </div>
        <div  id="account-identify-right" class="grid_4">
            <div class="pad10-x">
    <h4 class="">What people are saying</h4>    
    <blockquote>The CEA Form Filler saves me tons of time! Now I focus on closing the deal instead of paperwork! Thanks PropSage.</blockquote>
    <cite>— Bernard Goh</cite>
    <blockquote>This is one of the best SMS advertising platform for real estate agents! After switching from a hardware-based solution, I never looked backed!</blockquote>
    <cite>— John Chan</cite>
    <blockquote>I love the automatic client reminders for my appointments. I hardly have my clients missing their property viewings anymore.</blockquote>
    <cite>— David Chong</cite>
    <blockquote>PropSage is great for helping my customers understand agreement and have confidence in my services as a real estate agent.</blockquote>
    <cite>— Jane Goh</cite>
			</div>
        </div>
    </form>
	</div>
</div>       
</div>
<!-- part 2 -->
<div id="support">
	<h2>Tutorials</h2>
	<div class="content">
		<input id="filter_input" placeholder="Search" />
		<ul id="list_to_filter">
		<?php
		$this->widget('zii.widgets.CListView', array(
			'dataProvider'=>$dataProvider,
			'itemView'=>'_item_two',
			'pagerCssClass'=>'paging',
			'template'=>"{items}\n{pager}",
			'ajaxUpdate'=>false,
		)); 	
		?>
		</ul>
	</div>
	
</div>     

<script type="text/javascript" language="JavaScript">
$(document).ready(function () {
    $('ul#list_to_filter a').click(function(){
		$.cookie('my_cookie_click',$(this).attr('id'));
    });
	var my_click = $.cookie('my_cookie_click');
	$('ul#list_to_filter a#'+my_click).click();
	$.cookie("my_cookie_click", null);

	function addCommas(num) {
		num = String(num);
		var rgx = /(\d+)(\d{3})/;
		while (rgx.test(num)) {
			num = num.replace(rgx, '$1' + ',' + '$2');
		}
		return num;
	}
	
	$(function() {
		var lists = $('#list_to_filter #yw2 .items');
		for (i in data)
		{
			movieTitle = data[i];
			lists.append('<li><a href="#">' + movieTitle + '</a></li>');
		}
		var numDisplayed = $(".num_displayed");
		$("#filter_input").fastLiveFilter("#list_to_filter #yw2 .items", {
			callback: function(total) { numDisplayed.html(addCommas(total)); },
		});
	});
});
</script>
<!-- part 2 end -->	